//
//  UINavigationItem+MMAdd.m
//  oc_demo
//
//  Created by haigui on 2021/8/5.
//

#import "UINavigationItem+MMAdd.h"

@implementation UINavigationItem (MMAdd)

/// 设置返回按钮的标题
/// @param title 标题
- (void)setBackBarButtonItemTitle:(NSString *)title{
    if (@available(iOS 11.0, *)) {
        self.backButtonTitle = title;
    } else {
        // Fallback on earlier versions
        UIBarButtonItem *backButtonItem = [[UIBarButtonItem alloc]init];
        backButtonItem.title = title;
        self.backBarButtonItem = backButtonItem;
    }
}


@end
